package azServiceLayer;

import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;

import aaGame.GameEngine;
import aaGame.RpgGameFrame;

public class Input implements KeyListener {
	GameEngine mEngine;
	
	public final static int LEFT 	= KeyEvent.VK_LEFT;
	public final static int RIGHT 	= KeyEvent.VK_RIGHT;
	public final static int UP 		= KeyEvent.VK_UP;
	public final static int DOWN 	= KeyEvent.VK_DOWN;
	public final static int SPACE 	= KeyEvent.VK_SPACE;
	public final static int ENTER 	= KeyEvent.VK_ENTER;
	public final static int ESCAPE	= KeyEvent.VK_ESCAPE;
	public final static int ONE 	= KeyEvent.VK_1;
	public final static int TWO 	= KeyEvent.VK_2;
	public final static int Z 		= KeyEvent.VK_Z;

	
	public Input(GameEngine engine, RpgGameFrame frame){
		mEngine = engine;
	}

	@Override
	public void keyPressed(KeyEvent e) {
		int key = e.getKeyCode();
		mEngine.keyPressed(key);
	}

	@Override
	public void keyReleased(KeyEvent e) {
		int key = e.getKeyCode();
		mEngine.keyReleased(key);
	}

	@Override
	public void keyTyped(KeyEvent arg0) {
		// TODO Auto-generated method stub
		
	}

}
